<title>{{ title }}</title>

{% for meta in metaTags -%}
    <meta{% for attribute,value in meta %} {{ attribute }}="{{ value }}"{% endfor %} />
{% endfor %}

{% for link in linkTags -%}
    <link{% for attribute,value in link %} {{ attribute }}="{{ value }}"{% endfor %} />
{% endfor %}

{% if favIcon -%}
    <link rel="shortcut icon" href="{{ favIcon }}" type="image/x-icon" />
{% endif %}

{% for script in inlineScripts -%}
    <script type="module" nonce="{{ nonce }}">
        {{- script|raw -}}
    </script>
{% endfor %}

{% for script in scripts -%}
    <script {{ script.isScriptModule() ? "type=\"module\""|raw : "defer" }} crossorigin nonce="{{ nonce }}" src="{{ script.getWebPath() }}"></script>
{% endfor %}

{%- if jsonLD -%}
    <script type="application/ld+json">
        {{- jsonLD|raw -}}
    </script>
{%- endif -%}

{%- for inlineStyle in inlineStyles -%}
    <style>
        {{- inlineStyle|minifyStylesheetContents -}}
    </style>
{%- endfor -%}

<meta name="vanilla-styles" />

{% for stylesheet in styles -%}
    {% if stylesheet.isNoScript|default(false) %}<noscript>{% endif %}
    <link href="{{ stylesheet.getWebPath() }}" rel="stylesheet" type="text/css" />
    {% if stylesheet.isNoScript|default(false) %}</noscript>{% endif %}
{% endfor -%}

{{ preloadModel.renderHtml()|raw }}
